#include<iostream>
#include<cstring>
using namespace std;
long long f[51],n;
long long fib(int i){
    if(f[i]!=0)return f[i];
    f[i]=fib(i-2)+fib(i-1);
    return f[i];
}
int main(){
    cin>>n;
    f[1]=1;f[2]=2;
        cout<<fib(n)<<endl;
    return 0;
}